import { createRouter, createWebHashHistory } from "vue-router";
// createWebHashHistory hash 路由
// createWebHistory history 路由
// createMemoryHistory 带缓存 history 路由
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      redirect: "/introduce",
    },
    {
      path: "/introduce",
      name: "introduce",
      component: () => import(/* webpackChunkName: "introduce" */ "../views/Introduce.vue"),
    },
    {
      path: "/dashboard",
      name: "dashboard",
      component: () => import(/* webpackChunkName: "dashboard" */ "../views/Index.vue"),
    },
    {
      path: "/login",
      name: "Login",
      component: import(/* webpackChunkName: "Login" */ "../views/Login.vue"),
    },
    {
      path: "/complex-table",
      name: "ComplexTable",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/table/ComplexTable.vue"),
    },
    {
      path: "/pdf-export",
      name: "PdfExport",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/ToolComponent/PdfExport.vue"),
    },
    {
      path: "/img-export",
      name: "ImgExport",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/ToolComponent/ImgExport.vue"),
    },
    {
      path: "/filetoexecl",
      name: "FileToExecl",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/ToolComponent/FileToExecl.vue"),
    },
    {
      path: "/weditor",
      name: "Weditor",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/ToolComponent/Weditor.vue"),
    },
    {
      path: "/tinymce",
      name: "TinymceEditor",
      component: import(/* webpackChunkName: "ComplexTable" */ "../views/ToolComponent/TinymceEditor.vue"),
    },
  ],
});

export default router;
